Add missing save-match-data call
authorjustbur <justin@burkett.cc>
Mon, 10 Aug 2015 13:09:59 +0000 (09:09 -0400)
committerjustbur <justin@burkett.cc>
Mon, 10 Aug 2015 13:09:59 +0000 (09:09 -0400)
which-key.el

index 81873eb486c560150ba114f632be77eeecd0b040..79f51c576a2872c06a9d0f5260d1e492b43ebdc8 100644 (file)
@@ -868,17 +868,18 @@ BUFFER that follow the key sequence KEY-SEQ."
   (let ((key-str-qt (regexp-quote (key-description which-key--current-prefix)))
         (buffer (current-buffer))
         key-match desc-match unformatted)
-    (with-temp-buffer
-      (describe-buffer-bindings buffer which-key--current-prefix)
-      (goto-char (point-max)) ; want to put last keys in first
-      (while (re-search-backward
-              (format "^%s \\([^ \t]+\\)[ \t]+\\(\\(?:[^ \t\n]+ ?\\)+\\)$"
-                      key-str-qt)
-              nil t)
-        (setq key-match (match-string 1)
-              desc-match (match-string 2))
-        (cl-pushnew (cons key-match desc-match) unformatted
-                    :test (lambda (x y) (string-equal (car x) (car y))))))
+    (save-match-data
+      (with-temp-buffer
+        (describe-buffer-bindings buffer which-key--current-prefix)
+        (goto-char (point-max)) ; want to put last keys in first
+        (while (re-search-backward
+                (format "^%s \\([^ \t]+\\)[ \t]+\\(\\(?:[^ \t\n]+ ?\\)+\\)$"
+                        key-str-qt)
+                nil t)
+          (setq key-match (match-string 1)
+                desc-match (match-string 2))
+          (cl-pushnew (cons key-match desc-match) unformatted
+                      :test (lambda (x y) (string-equal (car x) (car y)))))))
     (when which-key-sort-order
       (setq unformatted
             (sort unformatted (lambda (a b) (funcall which-key-sort-order a b)))))